#ifndef CHATBOX_H
#define CHATBOX_H

#include <QWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QPixmap>
#include <QTextBrowser>

namespace Ui {
class ChatBox;
}

class ChatBox : public QWidget
{
    Q_OBJECT

public:
    explicit ChatBox(QPixmap headPhoto,QString username,QWidget *parent = nullptr,bool isSender=true);
    ~ChatBox();
    void setChatMassage(QString message);
    QString getChatMassage();
    void setUsername(QString username);
    QString getUsername();
    void setHeadPhoto(QPixmap headPhoto);
    QPixmap getHeadPhoto();

private:
    Ui::ChatBox *ui;
    QLabel *Label_Head_Icon;
    QLabel *Label_Name;
    QLabel *Label_Info;
    QString chatMessage;
    QString username;
    QPixmap headPhoto;
};

#endif // CHATBOX_H
